package com.niit.mystudent.client;

import com.niit.entity.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "mycourse")
public interface CourseClient {
  //编写调用接口，必须和提供方接口保持一致。支持SpringMVC方式调用
  @GetMapping("/course/{id}")
  public ResponseEntity<Course> queryById(@PathVariable("id") Integer id);
}
